package cn.psvmc.cxzapi.task;

import cn.psvmc.cxzapi.service.goods.TGoodsService;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;

import javax.annotation.Resource;

/**
 * @author ywx
 * @className GoodsTask
 * @description 商品定时任务
 * @date 2024/12/14 22:51
 **/
public class GoodsTask {
    @Resource
    private TGoodsService goodsService;

    /**
     * 每天凌晨1点生成最近账单的支付宝交易号
     */
    @Async("threadPoolTaskScheduler")
    @Scheduled(cron = "${cron.tradeNo}")
    public void goodsDirectModify() {
        goodsService.goodsDirectModify();
    }
}
